
#include "commonfunctions.h"

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>


bool CommonFunctions::printError(bool isError) {

	if (!isError)
		return false;

	std::cerr << strerror(errno) << std::endl;
	return true;

}


void CommonFunctions::exitOnError(bool isError) {

	if (printError(isError))
		exit(errno);

}


